package com.fintech.third.utils.shzx;

public class RandomCode {
	private static String baseChars = "QWERTYUIOPASDFGHJKLZXCVBNM0123456789";

	/**
	 * 生成1-9和A-Z的3位随机数
	 * @param len
	 * @return
	 */
	public static String getChar(int len) {
		String chars = "";
		for (int i = 0; i < len; i++) {
			int baseIndex = (int) (Math.random() * baseChars.length());
			chars += baseChars.charAt(baseIndex);
		}
		return chars.toUpperCase();
	}
}
